<?php

/**
 * ShopProfile form.
 *
 * @package    faceshop
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ShopProfileForm extends BaseShopProfileForm
{
  public function configure()
  {
      $this->setWidgets(array(
        'name'          =>      new sfWidgetFormInput(),
        'description'   =>      new sfWidgetFormTextarea(),
        'keyword'       =>      new sfWidgetFormTextarea(),
        'email'         =>      new sfWidgetFormInput(),
      ));
      
      $this->setValidators(array(
        'name'          =>      new sfValidatorString(array('required' => true)),
        'description'   =>      new sfValidatorString(array('required' => false)),
        'keyword'       =>      new sfValidatorString(array('required' => false)),
        'email'         =>      new sfValidatorEmail(array('required' => false)),
      ));
      $this->widgetSchema->setLabels(array(
        'name'          =>      'Name',
        'description'   =>      'Description',
        'keyword'       =>      'Keyword',
        'email'         =>      'Email',
      ));
      $this->widgetSchema->setNameFormat('shop_profile[%s]');
  }
}
